﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Software41.Tracking.Model;
using Software41.Tracking.Data.EF;


namespace Software41.Tracking.Data.EF
{
    public class ProcessTraceInfoContext : DbContext
    {

        public ProcessTraceInfoContext()
        {
            Database.SetInitializer<ProcessTraceInfoContext>(null);
        }

        public DbSet<ProcessTraceInfo> ProcessTraceInfos { get; set; }
        public DbSet<StepInfo> StepInfos { get; set; }
        public DbSet<ActionInfo> ActionInfos { get; set; }
        public DbSet<ExceptionDetail> ExceptionDetails { get; set; }
        public DbSet<DocReferenceData> ReferenceDatas { get; set; }
        public DbSet<LogDetail> LogDetails { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new LogDetailMapping());
            modelBuilder.Configurations.Add(new ProcessTraceInfoMapping());
            modelBuilder.Configurations.Add(new StepInfoMapping());
            modelBuilder.Configurations.Add(new ActionInfoMapping());
            modelBuilder.Configurations.Add(new ExceptionDetailMapping());
            modelBuilder.Configurations.Add(new DocReferenceDataMapping());
        }
    }
}
